﻿using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETA.Entity;
using ETA.DomainEnum;

namespace ETA.EntityMappings
{
    public class WebMessageMap : ClassMap<WebMessage>
    {
        public WebMessageMap()
        {
            Id(x => x.WebMessageId);
            Map(x => x.FlowLogId);
            Map(x=>x.Content);
            Map(x => x.UserId);
            Map(x => x.RegistrationMainFormId);
            Map(x => x.EDate);
            Map(x => x.SDate);
            Map(x => x.IsDelete);
            Map(x => x.ModifyDate);
            Map(x => x.CreateDate);
            Map(x => x.MessageOpenEnum).CustomType<MessageOpenEnum>().Column("State");
            Map(x => x.MessageTypeEnum).CustomType<MessageTypeEnum>().Column("MessageType");
        }
    }
}
